//
//  APMacros.h
//  AqualPolo
//
//  Created by dong on 2024/5/1.
//
#import <UIKit/UIKey.h>

typedef enum : NSUInteger {
    APBallTypeNoviceDancer = 1,
    APBallTypeIntermediateWarrior = 2,
    APBallTypeSeniorDominator = 3,
    APBallTypeLeader = 4,
    APBallTypeLegendKing = 5,
    APBallTypeSupremeGod = 6,

} APBallType;

#ifndef APMacros_h
#define APMacros_h

#define LYRGBColor(r,g,b) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:1]
#define  LYRGBAColor(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#define  RandomColor RGBColor(arc4random_uniform(256),arc4random_uniform(256),arc4random_uniform(256))        //随机色生成


#define LYMainColor ColorWithHex(27E3DD)
#define  ColorWithHex(hexValue) ColorWithHexAndAlpha(hexValue,1.0)

#define  ColorWithHexAndAlpha(hexValue,a) [UIColor colorWithRed:((float)((0x##hexValue & 0xFF0000) >> 16))/255.0 \
green:((float)((0x##hexValue & 0xFF00) >> 8))/255.0 \
blue:((float)(0x##hexValue & 0xFF))/255.0 alpha:a]




#define translateKey @"translate_switch_status_Key"

//获取系统对象
#define  Application        [UIApplication sharedApplication]
#define  AppWindow          [UIApplication sharedApplication].delegate.window

//获取屏幕宽高
#define ScreenWidth ([[UIScreen mainScreen] bounds].size.width)
#define ScreenHeight [[UIScreen mainScreen] bounds].size.height
#define Screen_Bounds [UIScreen mainScreen].bounds


#define  ScreenMaxLength (MAX(kScreenWidth, kScreenHeight))

//强弱引用
#define  WeakSelf(type)  __weak typeof(type) weak##type = type;
#define  StrongSelf(type) __strong typeof(type) type = weak##type;
#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self



// 当前系统版本
#define  CurrentSystemVersion [[UIDevice currentDevice].systemVersion doubleValue]


//-------------------打印日志-------------------------
//DEBUG  模式下打印日志,当前行
#ifdef DEBUG
#define LYLog(fmt, ...) NSLog((@"%s [Line %d] " fmt), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
#else
#define LYLog(...)
#endif



//获取一段时间间隔
#define StartTime CFAbsoluteTime start = CFAbsoluteTimeGetCurrent();
#define EndTime  NSLog(@"Time: %f", CFAbsoluteTimeGetCurrent() - start)

//Library/Caches 文件路径
#define FilePath ([[NSFileManager defaultManager] URLForDirectory:NSCachesDirectory inDomain:NSUserDomainMask appropriateForURL:nil create:YES error:nil])
//获取temp
#define PathTemp NSTemporaryDirectory()
//获取沙盒 Document
#define PathDocument [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) firstObject]

//作品列表信息
#define worksListFile [PathDocument stringByAppendingPathComponent:@"worksListFile"]

//视频列表信息
#define video_file [PathDocument stringByAppendingPathComponent:@"videoFile"]


//作品评价
#define worksCommentsFiles [PathDocument stringByAppendingPathComponent:@"worksCommentsFiles"]


#define usersFile [PathDocument stringByAppendingPathComponent:@"users"]

#define images_path [PathDocument stringByAppendingPathComponent:@"images"]

//录音存放目录
#define VOICE_RECORDFILE_FOLDER_PATH [PathDocument stringByAppendingPathComponent:@"recordFiles"]
#define VIDEO_RECORDFILE_FOLDER_PATH [PathDocument stringByAppendingPathComponent:@"videoFiles"]

//获取沙盒 Cache
#define PathCache [NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) firstObject]



#endif /* APMacros_h */
